// Copyright (c) 2025, 大连理工大学 (Dalian University of Technology)
//
// Licensed under the Mulan PSL v2.
// You can use this file according to the terms and conditions of the Mulan PSL v2.
// You may obtain a copy of the License at
//
//     http://license.coscl.org.cn/MulanPSL2
//
// THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
// EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. SEE THE MULAN PSL v2
// FOR MORE DETAILS.

#include <gtest/gtest.h>

#include "DBManager/IService/Result/Summary/IEIGENVALUE_CPLXService.h"

#include "../../TestDB.h"

using namespace SG::DataStructure::Post;
using namespace SG::DBManager;

TEST (O_Summary, IEIGENVALUE_CPLXService)
{
    DB::ServiceFactory->ClearDatabase ();
    // 获取仓库服务
    auto service = DB::ServiceFactory->get<IEIGENVALUE_CPLXService> ();

    SG::DataStructure::Post::EIGENVALUE_CPLXData data;
    data.m_MODE       = 1;
    data.m_ORDER      = 1;
    data.m_REIGEN     = 1;
    data.m_IEIGEN     = 1;
    data.m_FREQ       = 1;
    data.m_DAMP       = 1;
    data.m_SPIN_SPEED = 1;
    data.m_domainId   = 1;

    ASSERT_EQ (service->Add (data), SG::DataStructure::Common::Status::STATUS_Success);

    // ASSERT_EQ (service->Find (1, 1, data), SG::DataStructure::Common::Status::STATUS_Success);
}
